import dht
import machine
import time

d = dht.DHT11(machine.Pin(12))
d.measure()
d.temperature() # eg. 23 (°C)
d.humidity()    # eg. 41 (% RH)

while True:
    time.sleep(2)
    d.measure()
    d.temperature() # eg. 23 (°C)
    d.humidity()    # eg. 41 (% RH)
    
